/* 账号设置页面样式 */

/* 设置容器 */
.settings-container {
    display: flex;
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* 设置侧边栏 */
.settings-sidebar {
    width: 240px;
    border-right: 1px solid var(--color-border);
    background-color: var(--color-gray-50);
}

.settings-nav {
    padding: 1.5rem 0;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.settings-nav-item img {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.settings-nav-item span {
    font-size: 0.9375rem;
}

.settings-nav-item:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.settings-nav-item:hover img {
    opacity: 1;
}

.settings-nav-item.active {
    background-color: var(--color-primary-50);
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

.settings-nav-item.active img {
    opacity: 1;
}

/* 设置内容区 */
.settings-content {
    flex: 1;
    min-height: 600px;
}

.settings-panel {
    display: none;
    padding: 2rem;
}

.settings-panel.active {
    display: block;
}

.panel-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-text-dark);
}

.panel-header p {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin: 0;
}

.panel-body {
    max-width: 800px;
}

/* 头像上传 */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 2px solid var(--color-border);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.avatar-hint {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin: 0;
}

/* 表单样式 */
.settings-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-top: 0.375rem;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* 密码输入框 */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle img {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.password-toggle:hover img {
    opacity: 0.8;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.75rem;
}

.strength-meter {
    display: flex;
    gap: 4px;
    margin-bottom: 0.375rem;
}

.strength-segment {
    height: 4px;
    flex: 1;
    background-color: var(--color-gray-200);
    border-radius: 2px;
}

.strength-segment:nth-child(-n+2) {
    background-color: var(--color-warning);
}

.strength-text {
    font-size: 0.8125rem;
    color: var(--color-warning);
}

/* 通知设置 */
.notification-channels {
    margin-bottom: 2rem;
}

.notification-channels h3,
.notification-types h3,
.privacy-section h3,
.linked-accounts-benefits h3,
.delete-consequences h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--color-text-dark);
}

.channel-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.channel-option {
    display: flex;
    align-items: center;
}

.channel-option input[type="checkbox"] {
    margin-right: 0.5rem;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-info h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.375rem;
    color: var(--color-text-dark);
}

.notification-info p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
}

.notification-toggles {
    display: flex;
    gap: 1.5rem;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.toggle-label {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-gray-300);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--color-primary);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--color-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

/* 隐私设置 */
.privacy-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.privacy-section:last-child {
    border-bottom: none;
}

.privacy-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.privacy-option:last-child {
    margin-bottom: 0;
}

.option-info {
    flex: 1;
}

.option-info h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.375rem;
    color: var(--color-text-dark);
}

.option-info p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
}

.privacy-option .select-wrapper {
    width: 240px;
}

.checkbox-option {
    align-items: flex-start;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* 关联账号 */
.linked-accounts-list {
    margin-bottom: 2rem;
}

.linked-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--color-border);
}

.linked-account-item:last-child {
    border-bottom: none;
}

.account-info {
    display: flex;
    align-items: center;
}

.account-icon {
    width: 36px;
    height: 36px;
    margin-right: 1rem;
}

.account-details h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    color: var(--color-text-dark);
}

.account-status {
    font-size: 0.875rem;
    margin: 0;
}

.account-status.connected {
    color: var(--color-success);
}

.account-status.not-connected {
    color: var(--color-text-light);
}

.benefits-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.benefits-list li {
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

/* 注销账号 */
.warning-box {
    display: flex;
    background-color: var(--color-danger-50);
    border: 1px solid var(--color-danger-100);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.warning-icon {
    margin-right: 1rem;
}

.warning-icon img {
    width: 24px;
    height: 24px;
}

.warning-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-danger);
}

.warning-content p {
    font-size: 0.9375rem;
    color: var(--color-text);
    margin: 0;
}

.delete-consequences {
    margin-bottom: 2rem;
}

.consequences-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}

.consequences-list li {
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.delete-confirmation {
    background-color: var(--color-gray-50);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .settings-container {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .settings-nav {
        display: flex;
        overflow-x: auto;
        padding: 1rem 0;
    }

    .settings-nav-item {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .settings-nav-item.active {
        border-left: none;
        border-bottom: 3px solid var(--color-primary);
    }

    .settings-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .notification-item {
        flex-direction: column;
        gap: 1rem;
    }

    .notification-toggles {
        width: 100%;
        justify-content: space-between;
    }

    .privacy-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .privacy-option .select-wrapper {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .settings-nav {
        padding: 0.75rem 0;
    }

    .settings-nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .settings-nav-item img {
        margin-right: 0.5rem;
        width: 16px;
        height: 16px;
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }

    .notification-toggles {
        gap: 0.75rem;
    }

    .toggle-group {
        min-width: auto;
    }
}